﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HealthCenter
{
    public partial class TestForm : Form
    {
        public TestForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            StringBuilder sb = new StringBuilder();
            string src = textBox1.Text;
            char[] a = { ',' };
            string[] ss = src.Split(a);
            if (ss != null)
            {
                foreach (string s in ss)
                {
                    string[] b = ScarsServiceHelper.SearchMerchandiseName(s);
                    if (b != null && b.Length == 2)
                    {
                        sb.Append(b[0]);
                        sb.Append(":");
                        sb.Append(b[1]);
                    }
                    sb.Append("\n");
                }
            }
            textBox2.Text = sb.ToString();
        }
    }
}
